//
//  LFBNavigationController.m
//  loveFreshBeen
//
//  Created by Feng on 2017/7/9.
//  Copyright © 2017年 feng. All rights reserved.
//

#import "LFBNavigationController.h"
#import "UIColor+Addition.h"

@interface LFBNavigationController ()

@end

@implementation LFBNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //设置navigationBar的左边,右边,以及返回按钮的文字颜色
    self.navigationBar.tintColor = [UIColor blueColor];
    
    //设置navigationBar的背景颜色,44(导航条) + 20 (状态栏)
    self.navigationBar.barTintColor = [UIColor colorWithHex:0xFACB3D alpha:1];
    
    //设置navigationBar的中间文字属性
    self.navigationBar.titleTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor darkGrayColor]};
}

//设置push子控制器后,隐藏标签栏
//重写navigationController的push方法,在内部做处理
//initWithRootViewController:时也会调用push方法
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if(self.viewControllers.count > 0)
    {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    
    [super pushViewController:viewController animated:animated];
}

@end
